# coding=utf-8
class Solution:
    def reverse(self, x: int) -> int:
        if x >= 0:
            a = list(str(x))
            a.reverse()
            b = ''.join(a)
            b = int(b)
            if b <= -(2 ** 31) or b >= ((2 ** 31) - 1):
                return 0
            return b
        else:
            x = -x
            a = list(str(x))
            a.reverse()
            b = ''.join(a)
            b = -int(b)
            if b <= -(2 ** 31) or b >= ((2 ** 31) - 1):
                return 0
            return b


ab = Solution()
bb = ab.reverse(1534236469)
print(bb)
